using System;

namespace armcontrolgui
{
	public static class RunGtkThread
	{
		public delegate void VoidDelegate();
		public static void RunOnGtkThread (VoidDelegate MyDelegate)
		{
			Gtk.Application.Invoke ((sender, arg) => {
				try {
					MyDelegate();
				} catch (Exception e) {
					Console.WriteLine("RunOnGtkThread: {0}", e);
				}
			});
		}
		
	}
}
